import Vue from 'vue'
import Router from 'vue-router'
import Order from '../pages/Order/Order'
import Profile from '../pages/Profile/Profile'
import Search from '../pages/Search/Search'
import MSite from '../pages/MSite/MSite'
import Login from '../pages/Login/Login'
import Shop from '../pages/shop/shop'
import ShopGoods from '../pages/shop/shopGoods/shopGoods'
import ShopInfo from '../pages/shop/ShopInfo/ShopInfo'
import ShopRatings from '../pages/shop/ShopRatings/ShopRatings'

Vue.use(Router)

export default new Router({
  routes: [
    {
      path: '/msite',
      component:MSite,
      meta:{
        showFooter:true
      }
    },
    {
      path: '/order',
      component:Order,
      meta:{
        showFooter:true
      }
    },
    {
      path: '/profile',
      component:Profile,
      meta:{
        showFooter:true
      }
    },
    {
      path: '/search',
      component:Search,
      meta:{
        showFooter:true
      }
    },
    {
      path: '/login',
      component:Login,
    },
    {
      path: '/shop',
      component: Shop,
      children: [
        {
          path: '/shop/goods',
          component: ShopGoods
        },
        {
          path: '/shop/ratings',
          component: ShopRatings
        },
        {
          path: '/shop/info',
          component: ShopInfo
        },
        {
          path: '',
          redirect: '/shop/goods'
        },
      ]
    },

    {
      path:'/',
      redirect:'/msite'
    }
  ]
})
